
class_name FengJianKe


static func CreateCardData() -> CardData:
	var data = CardData.new()
	
	data.attack = 30
	data.hp = 240
	data.maxHp = data.hp
	data.defence = 10
	data.speed = 8
	
	data.cardName = "疯剑客"
	data.cardDesc = "攻速+30%\n受伤额外增加20%"
	data.image = load("res://texture/Role/疯剑客.png")
	
	return data


static func CreateCard() -> Card:
	var cardprefab = load("res://prefab/card.tscn")
	var card: Card = cardprefab.instantiate()
	
	var extData = {
		isBuffed = false
	}
	
	var data: CardData = CreateCardData()
	data.onDefence = func(damage: int):
		if damage < data.defence:
			return 1;
		return (damage - data.defence) * 1.2
			
	data.getSpeed = func():
		return data.speed * 1.3
	
	card.setData(data)
	
	return card
	


	
